package com.google.code.sharecontent.action;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.async.CronSchedule;
import org.jboss.seam.async.QuartzDispatcher;
import org.jboss.seam.async.QuartzTriggerHandle;
import org.jboss.seam.core.Events;
import org.jboss.seam.log.Log;


/**
 * http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4119536#4119536
 * @author marat
 *
 */
@Name("synchronizationTimer")
@Scope(ScopeType.APPLICATION)
@Startup
public class SynchronizationTimer
{
	@Logger
	Log log;

	@Create
	public void start() throws Exception
	{
		log.info("Start synchronizationTimer");
//		Events.instance().raiseTimedEvent("ResourceScanner", new CronSchedule((Long) null, "0 */2 * * * ?"));
	}
	

	@Destroy
	public void stop()
	{
		log.info("Stop synchronizationTimer");
	}

}
